package com.ttflutter.tkvideodownloader;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.Nullable;

/**
 * @author Afra55
 * @date 2018/5/25
 * A smile is the best business card.
 */
public class HomeHeightImageView extends androidx.appcompat.widget.AppCompatImageView {
    public HomeHeightImageView(Context context) {
        super(context);
    }

    public HomeHeightImageView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public HomeHeightImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        //noinspection SuspiciousNameCombination
        super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec((int) (widthMeasureSpec * 1.5), MeasureSpec.EXACTLY));
    }
}
